﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Content.Master" Inherits="System.Web.Mvc.ViewPage<MvcEngineModel>" %>

<asp:Content ID="indexHead" ContentPlaceHolderID="head" runat="server">
    <% 
        string title = Model.Localize(Model.Page.Title);
        string description = Model.Localize(Model.Page.Description);
        string keywords = Model.Localize(Model.Page.Keywords);

        this.Title = title;

        Dictionary<string, string> items = Model.GetModelItem<Dictionary<string, string>>();
        if (items != null)
        {
            if (items.ContainsKey("Title") && !string.IsNullOrEmpty(items["Title"]))
                title = items["Title"];
            if (items.ContainsKey("Description") && !string.IsNullOrEmpty(items["Description"]))
                description = items["Description"];
            if (items.ContainsKey("Keywords") && !string.IsNullOrEmpty(items["Keywords"]))
                keywords = items["Keywords"];
        }
    %>
    <meta name="description" content="<%= description %>" />
    <meta name="keywords" content="<%= keywords %>" />
    <% if (!string.IsNullOrEmpty(Model.Page.Header))
       { %>
    <%= Model.Page.Header %>
    <%} %>
</asp:Content>
<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">
    <% Html.RenderPartial("IndexMarkup", ViewData); %>
</asp:Content>
